package ru.inse.core.service.realty.filter;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import ru.inse.core.domain.realty.RealtyObject;


public class ItemFilters
{
    private final Map<RealtyObject, List<IRealtyFilter>> filtersMap = new HashMap<RealtyObject, List<IRealtyFilter>>();

    public ItemFilters()
    {
        List<IRealtyFilter> filters = new ArrayList<IRealtyFilter>(5);
        filters.add(RoomFilter.ONE);
        filters.add(RoomFilter.TWO);
        filters.add(RoomFilter.THREE);
        filters.add(RoomFilter.FOUR);
        filters.add(RoomFilter.FIVE_AND_MORE);
        filtersMap.put(RealtyObject.NEW, filters);
        filtersMap.put(RealtyObject.SECONDARY, filters);
    }

    public List<IRealtyFilter> getFilters(RealtyObject realtyObject)
    {
        List<IRealtyFilter> list = filtersMap.get(realtyObject);
        if (list != null)
        {
            return list;
        }
        return Collections.<IRealtyFilter> emptyList();
    }
}

